<template>
  <el-container>
    <el-header style="height:40px">订单查看</el-header>
    <el-main>
      <el-row>
        <el-button
          size="mini"
          type="success"
          style="marginBottom:10px"
          @click="audit"
        >
          查看
        </el-button>
          <el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose">
  <span>这是一段信息</span>
  <span slot="footer" class="dialog-footer">
    <router-view></router-view>
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
    </el-dialog>
      </el-row>
  
      <el-row>
        <el-col :span="6">{{ person }}</el-col>
        <el-col :span="6">{{ type }}</el-col>
        <el-col :span="6">{{ content }}</el-col>
        <el-col :span="6">{{ operation }}</el-col>
      </el-row>
    </el-main>

  </el-container>
</template>

<script>
export default {
  data() {
    return {
      person: '申请人',
      type: '申请类型',
      content: '申请操作',
      operation: '操作',
      dialogVisible: false
    }
  },
  methods:{
     audit(){
     console.log(4444);
     console.log(window.sessionStorage.getItem('role'))
      if (window.sessionStorage.getItem('role') === 'manager')   this.$router.push('/managerAudit')
      else  if (window.sessionStorage.getItem('role') === 'financial')   this.$router.push('/financialAudit') 
      else   this.$message.error('错了哦，这是一条错误消息')
       this.dialogVisible = true
     },
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      }
  }
}
</script>

<style scoped>
.el-header{
  font-size:18px;
  padding:0;
  color:#000;
  border-bottom:1px solid #666 ;
}
.el-col{
   border:1px solid #eee ;
   font-size: 16px;
   color: #000;
   padding:8px 10px;
 }
</style>

